{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Normal Inverse Gaussian Process\n",
    "\n",
    "\n",
    "## Contents\n",
    "   - [Numerical methods for option pricing](#sec1)\n",
    "   - [The NIG PIDE method](#sec2)\n",
    "     - [The Lévy measure](#sec2.1)\n",
    "     - [The PIDE](#sec2.2) \n",
    "\n",
    "The methods used in this notebook are basically the same presented in the notebook **3.2**.     \n",
    "As you probably have noticed, reading the notebook **5.1**, the NIG process is very similar to the VG process.      They are both obtained by Brownian subordination. They both depend on three variables. Their distribution is quite similar.   \n",
    "\n",
    "Of course, the numerical methods for option pricing must be identical as well."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import scipy as scp\n",
    "import scipy.stats as ss\n",
    "import scipy.special as scps\n",
    "import matplotlib.pyplot as plt\n",
    "from functools import partial\n",
    "from scipy.integrate import quad\n",
    "\n",
    "from functions.probabilities import Q1, Q2\n",
    "from functions.CF import cf_NIG"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "T = 1                    # terminal time \n",
    "N= 10000000              # number of generated random variables\n",
    "S0 = 100.0               # initial price\n",
    "K = 100.0                # strike \n",
    "k = np.log(K/S0)         # log moneyness\n",
    "\n",
    "r = 0.1\n",
    "theta = -0.11          # drift of the Brownian motion \n",
    "sigma = 0.2            # volatility of the Brownian motion\n",
    "kappa = 0.3            # variance of the IG process\n",
    "lam = T**2 / kappa     # scale\n",
    "mu_s = T / lam         # scaled mu\n",
    "\n",
    "w = ( 1 - np.sqrt( 1 - 2*theta*kappa -kappa*sigma**2) )/kappa  # Martingale correction\n",
    "dev_X = np.sqrt(sigma**2 + theta**2 * kappa)                   # std dev NIG process"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let me recall the derivation of some formulas:\n",
    "\n",
    "##### Mean and Variance: \n",
    "Using the Brownian subordination expression for the NIG process (where $T_t \\sim IG(t,\\kappa t)$), we get\n",
    "\n",
    "$$ \\mathbb{E}[X_t] = \\mathbb{E}[\\theta T_t + \\sigma W_{T_t}] = \\theta \\mathbb{E}[T_t] + 0 = \\theta t.$$\n",
    "\n",
    "where I used the [Tower property](https://en.wikipedia.org/wiki/Law_of_total_expectation), and\n",
    "\n",
    "$$ \\mbox{Var}[X_t] = \\mbox{Var}[\\theta T_t + \\sigma W_{T_t}] = \\theta^2 \\mbox{Var}[T_t] + \n",
    "\\sigma^2 \\mbox{Var}[W_{T_t}] = (\\theta^2 \\kappa + \\sigma^2) t. $$\n",
    "\n",
    "where for the term $\\mbox{Var}[W_{T_t}]$ I used the [conditional variance](https://en.wikipedia.org/wiki/Law_of_total_variance) formula.\n",
    "\n",
    "##### Martingale correction:\n",
    "\n",
    "The idea is to find the correction term $w$ such that the process $e^{-rt}S_t$ is a martingale. The stock process has dynamics $S_t = S_0 e^{rt - wt + X_t}$.     \n",
    "We have that\n",
    "\n",
    "$$ \\mathbb{E}[ e^{-rt} S_0 e^{rt - wt + X_t} ] = S_0$$\n",
    "\n",
    "$$ \\mathbb{E}[ e^{-wt + X_t}] = 1$$\n",
    "\n",
    "$$ e^{wt} = \\mathbb{E}[ e^{X_t}] $$\n",
    "\n",
    "$$ w = \\log( \\phi(-i) ) \\quad \\quad \\mbox{for} \\quad t=1  $$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The martingale correction w=-0.088817 can be computed from the CF as: \n",
      "(-0.088817+0j)\n"
     ]
    }
   ],
   "source": [
    "print(\"The martingale correction w={0:.6f} can be computed from the CF as: \".format(w))\n",
    "print( np.log(cf_NIG( -1j, t=1, mu=0, theta=theta, sigma=sigma, kappa=kappa )).round(6) )"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a id='sec1'></a>\n",
    "\n",
    "# Numerical methods\n",
    "\n",
    "##### Monte Carlo"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Monte Carlo, call: 13.429721691441594, std err: 0.0049326098983063895\n",
      "Monte Carlo, put: 3.915092184682041, std_err: 0.0025466749195472587\n"
     ]
    }
   ],
   "source": [
    "np.random.seed(seed=42) \n",
    "IG = ss.invgauss.rvs(mu=mu_s, scale=lam, size=N)    # The IG RV\n",
    "Norm = ss.norm.rvs(0,1,N)                           # The normal RV  \n",
    "X = theta * IG + sigma * np.sqrt(IG) * Norm         # NIG random vector\n",
    "S_T = S0 * np.exp( (r-w)*T + X )                    # exponential dynamics\n",
    "\n",
    "call_payoff = np.maximum(S_T-K,0)\n",
    "put_payoff = np.maximum(K-S_T,0)\n",
    "call = np.exp(-r*T) * scp.mean( call_payoff )\n",
    "put = np.exp(-r*T) * scp.mean( put_payoff )\n",
    "call_err = np.exp(-r*T) * ss.sem( call_payoff )\n",
    "put_err = np.exp(-r*T) * ss.sem( put_payoff )\n",
    "print(\"Monte Carlo, call: {}, std err: {}\".format(call,call_err))\n",
    "print(\"Monte Carlo, put: {}, std_err: {}\".format(put,put_err))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### Fourier inversion"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fourier inversion call:  13.427965\n",
      "Fourier inversion put:  3.911707\n"
     ]
    }
   ],
   "source": [
    "# function binding\n",
    "cf_NIG_b = partial(cf_NIG, t=T, mu=r-w, theta=theta, sigma=sigma, kappa=kappa ) \n",
    "\n",
    "# price\n",
    "call_F = S0 * Q1(k, cf_NIG_b, np.inf) - K * np.exp(-r*T) * Q2(k, cf_NIG_b, np.inf)\n",
    "put_F = -S0 * (1-Q1(k, cf_NIG_b, np.inf)) + K * np.exp(-r*T) * (1-Q2(k, cf_NIG_b, np.inf))\n",
    "\n",
    "print(\"Fourier inversion call: \", call_F.round(6))\n",
    "print(\"Fourier inversion put: \", put_F.round(6))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a id='sec2'></a>\n",
    "\n",
    "# The NIG PIDE method \n",
    "\n",
    "<a id='sec2.1'></a>\n",
    "## Curiosities about the NIG Lévy measure\n",
    "\n",
    "The NIG process is a pure jump process with triplet $(b,0,\\nu)$. (For more information on the Lévy triplet see Appendix **A.3**)\n",
    "\n",
    "The expression of the drift $b$ in [2] and [3] is given for the parameters:\n",
    "\n",
    "$$ \\beta = \\frac{\\theta}{\\sigma^2}, \\quad \\quad \\alpha = \\sqrt{ \\beta^2 + \\frac{1}{\\kappa \\sigma^2} } \\quad \\quad\n",
    " \\delta = \\frac{T \\sigma}{\\sqrt{\\kappa}} $$\n",
    "\n",
    "and is:\n",
    "\n",
    "$$ b = \\frac{2 \\delta \\alpha}{\\pi} \\int_0^1 \\sinh(\\beta x) K_1(\\alpha x) dx $$\n",
    "\n",
    "The Lévy measure is:\n",
    "\n",
    "$$ \\nu(x) = \\frac{C}{|x|} e^{A x} K_1(B|x|) $$\n",
    "\n",
    "with\n",
    "\n",
    "$$ A = \\frac{\\theta}{\\sigma^2} \\quad B = \\frac{\\sqrt{\\theta^2 + \\sigma^2/\\kappa}}{\\sigma^2} \n",
    "\\quad C = \\frac{\\sqrt{\\theta^2 + \\sigma^2/\\kappa}}{\\sigma \\pi \\sqrt{\\kappa}} $$\n",
    "\n",
    "The function $K_1$ is a Bessel function of second kind with 1 degree of freedom.\n",
    "\n",
    "Let us recall from the Levy processes theory that:\n",
    "\n",
    "$$ \\mathbb{E}[X_t] = t \\biggl( b +  \\int_{|x|>1} x \\nu(dx) \\biggr)$$\n",
    "\n",
    "$$ \\text{Var}[X_t] = t \\int_{\\mathbb{R}} x^2 \\nu(dx) $$\n",
    "\n",
    "Let's verify it is correct:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [],
   "source": [
    "def NIG_measure(x):\n",
    "    A = theta/(sigma**2)\n",
    "    B = np.sqrt( theta**2 + sigma**2/kappa ) / sigma**2\n",
    "    C = np.sqrt(theta**2 + sigma**2/kappa) /(np.pi*sigma * np.sqrt(kappa))\n",
    "    return C/np.abs(x) * np.exp(A*(x)) * scps.kv(1, B*np.abs(x) )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEICAYAAABBBrPDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3dfZxdVX3v8c/3zEweISEPE4hJNLHEB8D6QC7iY703XIhUDbfVNrSWtGJTvbbqvdfbQr0Vr5b7ktsHq23Fi4IE6hUpauFaqdKg9WoRCYryDOFBEhKTgYQQSDJP59c/9jqTPWfOnJk5M3tmdvi+Xzmvs8/aa+2zzp6Z/M5aa6+1FRGYmZkNpzLVFTAzs+nNgcLMzJpyoDAzs6YcKMzMrCkHCjMza8qBwszMmnKgMGtCUkXSDZJ+d6rrYjZVHChsWpL0qKTdkubm0t4t6Tu51yHpxNzr1ZKukdQl6WlJD0r6a0nLh3mP35b0vRGqcjGwJSI+N86PZFZaDhQ2nbUDHxhNxhQwbgV2Aq+MiHnA64CHgNe3WoGIuDAiPtVq+aONpLaproNNPgcKm87+DPiQpONGkfejwPcj4r9GxA6AiNgTEX8VEdeM9Y0lzZd0uaRdkh6X9KeS2iTNlPSUpFNyeTslHZK0RNJdkt6a29ch6QlJr2jwHm+StEPSH0rak97rHElnS3pA0l5Jf5zLX5F0gaSHJD0p6VpJC3P7/17SzyXtl/RdSSfn9p0t6R5JB9Ln+VBKH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Rr9p7fBjoA76YkkY8X628T5M8oynbqvHUK9spHQN8Bfhg7hwM9zOdrHq9LiJ2SloC3CTpvtQDMF4Tcb5mAG8DLsztn4zzVUTZho6aQBERZwy3T9LuWtM6NRn3jPHww5XfAazI5VsO7JzgejV9D0ntwK8Ap+besxvoTtu3S3oIeBGwNZensHpFxO7csT4HfH00n6XoeqVjbATeAqyN1FE7mvM11vcZIc+MJmXH+7s6nnohqYMsSHwxIr5ay9DkZzop9YqI2vMeSV8j6175LlN8vpI3Az/Kn6NJOl+tlG3pfD1Xup5uADam7Y3A9RNU/gZgg6SZklYBq4EfTnC9bgNWS1qVvrlsSOVqzgDui4gdtQRJnZLa0vYLU70enqx61fXf/iegdhXZlJ4vSeuAPwLeFhEHawVaPF8j/Vxq9T1PmdOB/am536zseH9XW65XGuu6HLg3Iv4yX6DJz3Qy6jVX0rGpHnPJLkrI/05NyfnK7a9v0U/W+WqlbGvnazQj3mV/AIuALcCD6XlhSn8e8I1cvi+RdUP0kkXl85uVT/s+THaFwf3Amwuq19lkV6A8BHy47hhXAu+pS/tV4G6yqx1+BLx1MusFXA3cCfw0/WIunQ7ni2zwfDtwR3p8djznq9H7AO+p/TzIugD+Nu2/E1gzijoO+7s2hvPUUr2A15N1Ufw0d47OHulnOgn1emH62fwk/ZymxflK++YATwLz6445GefrBLL/p54Gnkrb84r4/fISHmZm1tRzpevJzMxa5EBhZmZNOVCYmVlTDhRmZtaUA4WZmTXlQGFmZk05UJiZWVP/BrvE9s8B0wg/AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = np.concatenate( (np.linspace(-0.1,-0.001,200), np.linspace(0.001, 0.1, 200) ))\n",
    "plt.plot(x, NIG_measure(x)); plt.title(\"NIG Lévy measure\"); plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### mean:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The theoretical mean is theta:  -0.11\n",
      "The drift component is:  -0.10992734491736127\n",
      "The mean is the sum of the drift and the integration over |x>1| i.e. :  -0.11000000000015916\n"
     ]
    }
   ],
   "source": [
    "beta = theta/(sigma**2)\n",
    "alpha = np.sqrt( beta**2 + 1/(kappa*sigma**2) )\n",
    "delta = sigma/np.sqrt(kappa)\n",
    "int_b = lambda y: 2/np.pi * delta * alpha * np.sinh(beta*y) * scps.kv(1, alpha*np.abs(y) ) \n",
    "drift = quad(int_b, 0, 1, points=0, limit=2000)[0]\n",
    "\n",
    "print(\"The theoretical mean is theta: \", theta)\n",
    "print(\"The drift component is: \", drift )\n",
    "\n",
    "mean_greater1 = quad(int_m, -10, -1, limit=2000)[0] + quad(int_m, 1, 10, limit=2000)[0]\n",
    "\n",
    "print(\"The mean is the sum of the drift and the integration over |x>1| i.e. : \", drift + mean_greater1 )"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### variance:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The variance obtained from integration of Lévy mesure is:  0.04363\n",
      "The theoretical variance is:  0.04363\n"
     ]
    }
   ],
   "source": [
    "int_s = lambda y: y**2 * NIG_measure(y)\n",
    "var_int = quad(int_s, -2, 2, points=0)[0]             # I inform that the point 0 has a singularity\n",
    "var_th = dev_X**2\n",
    "print(\"The variance obtained from integration of Lévy mesure is: \", round(var_int,6))\n",
    "print(\"The theoretical variance is: \", var_th.round(7))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### Martingale correction:\n",
    "\n",
    "The martingale correction can be computed from the Lévy measure as well:\n",
    "\n",
    "$$ w = \\int_{\\mathbb{R} \\backslash [-\\epsilon,\\epsilon]} (e^z-1) \\nu(dz). $$\n",
    "\n",
    "we have to choose an $\\epsilon > 0$ very small, but it cannot be zero. The reason is that the NIG process has infinite variation (see **A.3** for the definition) and this means that the integral above does not converge for $\\epsilon = 0$. \n",
    "\n",
    "**Comment:**     \n",
    "For infinite variation processes we have that:\n",
    "\n",
    "$ \\int_{[-\\epsilon,\\epsilon]} (e^z-1) \\nu(dz) \\approx \\int_{[-\\epsilon,\\epsilon]} z \\nu(dz) = \\infty. $\n",
    "\n",
    "This is the main difference with the VG process, which instead has finite variation."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Martingale correction:  -0.088817\n",
      "Martingale correction from integration:  -0.088817\n"
     ]
    }
   ],
   "source": [
    "epsilon = 0.0000001\n",
    "int_w = lambda y: (np.exp(y)-1) * NIG_measure(y)\n",
    "w2 = quad(int_w, -10, -epsilon)[0] + quad(int_w, epsilon, 10)[0]\n",
    "print(\"Martingale correction: \", w.round(6))\n",
    "print(\"Martingale correction from integration: \", round(w2,6) )"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<a id='sec2.2'></a>\n",
    "## The NIG PIDE\n",
    "\n",
    "The NIG PIDE is \n",
    "\n",
    "$$\n",
    "\\frac{\\partial V(t,x)}{\\partial t} \n",
    "          + \\biggl( r - \\int_{\\mathbb{R}} \\bigl( e^z-1-z \\mathbb{1}_{|z|<\\epsilon} \\bigr) \\nu(dz) \\biggr) \\frac{\\partial V(t,x)}{\\partial x} $$\n",
    "$$          + \\int_{\\mathbb{R}} \\bigl( V(t,x+z)- V(t,x) - z \\frac{\\partial V(t,x) }{\\partial x} \\mathbb{1}_{|z|<\\epsilon} \\bigr) \\nu(dz)  = r V(t,x).\n",
    "$$\n",
    "\n",
    "for a small value of $\\epsilon$ we can use the Brownian approximation described in **3.2** and **A.3**.      \n",
    "The jump-diffusion type PIDE is:\n",
    "\n",
    "$$\n",
    "  \\frac{\\partial V(t,x)}{\\partial t} +\n",
    " \\bigl( r-\\frac{1}{2}\\sigma_{\\epsilon}^2 - w_{\\epsilon} \\bigr) \\frac{\\partial V(t,x)}{\\partial x} \n",
    " + \\frac{1}{2}\\sigma_{\\epsilon}^2 \\frac{\\partial^2 V(t,x)}{\\partial x^2}\n",
    " + \\int_{|z| \\geq \\epsilon} V(t,x+z) \\nu(dz) = (\\lambda_{\\epsilon} + r) V(t,x).\n",
    "$$\n",
    "\n",
    "with parameters   \n",
    "\n",
    "$$\n",
    "  \\sigma_{\\epsilon}^2 :=  \\int_{|z| < \\epsilon} z^2 \\nu(dz), \\quad \\quad w_{\\epsilon} := \\int_{|z| \\geq \\epsilon} (e^z-1) \\nu(dz), \\quad \\quad\n",
    " \\lambda_{\\epsilon} :=  \\int_{|z| \\geq \\epsilon} \\nu(dz) .\n",
    "$$\n",
    "\n",
    "The previous approximated equation is identical to the VG equation.     \n",
    "I will not repeat the calculation. I will just present some numerical values and some plots.\n",
    "\n",
    "**Comment:**      \n",
    "I would like to point out that the convergence to the right price is quite slow, in particular for small values of $\\kappa$.     \n",
    "We have seen a similar behavior for the VG PIDE, but in the NIG PIDE is a bit worse.      \n",
    "The algorithm works very well for PUT options, while for CALL options it is hard to obtain good results under our grid resolution.    \n",
    "In order to improve the performances I also used a big computational domain $[A_1,A_2]$, but the improvements are still not satisfactory. \n",
    "I expect that for a higher grid resolution (in particular for more time steps), we can achieve better performances."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from functions.Parameters import Option_param\n",
    "from functions.Processes import NIG_process\n",
    "import functions.NIG_pricer as NIG"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "opt_param = Option_param(S0=S0, K=K, T=T, exercise=\"European\", payoff=\"call\" )\n",
    "opt_param2 = Option_param(S0=S0, K=K, T=T, exercise=\"European\", payoff=\"put\" )\n",
    "NIG_param = NIG_process(r=r, sigma=sigma, theta=theta, kappa=kappa)\n",
    "\n",
    "NIG_c = NIG.NIG_pricer(opt_param, NIG_param)\n",
    "NIG_p = NIG.NIG_pricer(opt_param2, NIG_param)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### European Call"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(13.38723669349473, 251.3608090877533)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "NIG_c.PIDE_price((22000,50000), Time=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 105,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEWCAYAAABxMXBSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deZzO9frH8deVfQ2hn+iENkWRJdKO6JTShpwWLdKmRavqnNLmpCRtJ0uJU4mUELKnokMonYSiZClly76O+fz+uG41OYMZ9/ee+56Z9/PxmMfM/b3v+/O91Lgvn+36WAgBERGRrDoo2QGIiEjuosQhIiLZosQhIiLZosQhIiLZosQhIiLZosQhIiLZosQhkgLM7EMza5/sOESyQolD8hUz+9HMfjWzEhmudTCzKRkeBzM7KsPjo81ssJmtMrMNZrbQzF40sypRxRVC+GsIYWBU7YkkkhKH5EcFgTuy8sJYApkB/AycFEIoDZwKfA+cFm8g5vT3UHIV/cJKfvQMcI+ZlcnCa7sC00IId4UQlgOEEFaGEHqFEAZn9gYzu8bMpsV6JevNbIGZNc3w/BQze9LMpgFbgOqxax0yvOYGM5tvZhvNbJ6Z1Y1dP8zM3ov1fhab2e0H/p9B5MAocUh+NAuYAtyThdc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ItuT7oSoREckeJQ4REckWJQ4REckWJQ4REckWJQ4REckWJQ6RiJnZQ7GqpP+NVU9tmOyYRKKUUkfHiuR2ZnYKvsu8bghhe6ykeeEkhyUSKSUOkWhVAlaHPyq9rk5yPCKR0wZAkQjFCstNxUvdTwSGhBA+Tm5UItHSHIdIhEIIm4B6QEe8XP8QM7smqUGJREw9DpEEMrPLgPYhhAuSHYtIVNTjEImQmR1rZkdnuFQHP75VJM/Q5LhItEoCL5pZGfzgp0X4sJVInqGhKhERyRYNVYmISLYocYiISLYocYiISLYocYiISLYocYiISLYocYiISLYocYiISLb8PwtkNNh632J7AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "NIG_c.plot([50,200,0,100])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### European Put"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(3.9110477337157423, 152.98903918266296)"
      ]
     },
     "execution_count": 106,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "NIG_p.PIDE_price((20000,30000), Time=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 107,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEWCAYAAABhffzLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3dd5gU1dLA4V+xC2wgLkmUqKIgSFyEK4IBiYIkEYwYEHNOmLOfgWu6V0VEBb0GDCiKogTFDAKKERRBERRJSs5S3x81iwsuMOx276R6n2eememdPnPaUN1z+p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UN5++23ee+89KleuTKtWrRgyZAhjx44N9iCLIGmu+AFKlIDhw6FPH7j0UnvtnHM7Wr9+PU2bNiU3N5datWpx5plnAjY236RJE1q3bs2CBQuYM2cO2dnZHHXUUYwdO5bZs2ezefNmDj74YD766CN69epFdnY2ZcqUoXfv3nz44YcxPrLoJM0Vf570dJvj36MHDBpkY/79+8e6V865nYnmyjxo+cf480yePJmJEyfy6aefkpWVxRFHHLFtbvzAgQO58847qV+/PqeffjpgC6cSVVJd8ecpVcpW97ZtC6ecAm+8EeseOefi3cqVK6lYsSJZWVnMnj2bKVOmbPtbq1atWLBgAc899xwnnHACAO3ateO1115j3bp1rF27lldffZW2bdvGqvt7JCkDP0BWlgX8Zs1ssdekSbHukXMunnXu3JktW7bQuHFjbrjhBlq3br3d348//njatGlDxYpWJrx58+acdtppHHLIIbRq1YqBAwfSrFmzWHR9jyVckrY99ccflt9n7lxb5XvoocH2zTm352bNmkWDBg1i3Y090q1bNy699FLat28f664UqKB/pjtL0pa0V/x5cnJg/HjYZx/L8fPFF7HukXMukaxYsYIDDjiAzMzMuA36eyrpbu4WZK+9YOJEG/Pv2BE++AAS7GLDORcjFSpU4Icffoh1NwKV9Ff8eWrVsuCflmYlHOfNi3WPnHMuNlIm8APUq2fBf8MGC/6//hrrHjnnXPFLqcAP0KiRlXBctsyC/9Klse6Rc84Vr9ACv4gcKCIz8z1WicglIpIjIhNEZE7kuWJYfdiZli1h7FiYP9/G/FesKO4eOOdc7IRZbP17VW2qqk2BFsA64FVgMDBJVesBkyLvd23x4sD7164djB4N335rs33WrAn8K5xzcUxEuPzyy7e9HzJkCDfffDMAN998M0OGDNn2t/vuu4/69etz8MEH06RJEy677DI2J3D1p+Ia6mkPzFXV+UAPYGRk+0ig5273XrgQhg4NvFOdO8Pzz8PUqdCzp439O+dSQ+nSpRk9ejTLli3b5eeGDh3K+PHjmTJlCl9//TXTpk2jatWqrF+/PtD+/PXXX4G2tyvFFfj7A89HXldT1UUAkeequ927fHk47zz43/8C71ifPvDUU7ay9/jjvYSjc6kiPT2dQYMGcf/99+/yc3fccQePPvooFSpUAKBUqVIMHjyYcuXK/eOz06ZN49BDD6VJkyYccsghrF69mhEjRnDBBRds+0y3bt2YPHkyAGXKlOHGG2+kVatW3HnnnRx//PHbPjd58mS6d+8OwPjx4/nXv/5F8+bN6du3L2uKOEQR+jx+ESkFHAtcs4f7DQIGAdSuWROaN7dai9nZVmE9QKeeakM9558PAwbAM8/YtE/nXDGIYV7m888/n8aNG3PVVVcV+PfVq1ezZs0a6tatu9u2Nm3aRL9+/Rg1ahQtW7Zk1apVZGZm7nKftWvX0qhRI2699Va2bNnCvvvuy9q1a8nOzmbUqFH069ePZcuWcfvttzNx4kSys7O5++67ue+++7jxxht326edKY4r/i7A56qaN1C/WESqA0SelxS0k6oOU9VcVc2tXLUqvP663ZXt1w/eeSfwTp53nlXwev55OOccL+HoXCooV64cp556Kg899FCBf1fV7QqZv/POOzRt2pQ6derwySefbPfZ77//nurVq9OyZcttbaen7/raOi0tjT59+gD2C6Rz58688cYbbNmyhTfffJMePXowZcoUvvvuO9q0aUPTpk0ZOXIk8+fPL8phF8vK3RP4e5gH4HVgAHBX5HlMVK2UKQNvvQVHHWVX/O+8Y0txA3T11VbC8Y47rJDLv//tJRydC10s8jLnc8kll9C8efNt6ZbzK1euHNnZ2fz000/UrVuXTp060alTJ7p168amTZu2++yOJ4k86enpbN26ddv7DfluJmZkZJCWb3ihX79+PPzww+Tk5NCyZUvKli2LqtKhQweef/55ghLqFb+IZAEdgNH5Nt8FdBCROZG/3RV1gxUrWsCvXRuOOQYKmbhtV267DS66CO6/H265JfDmnXNxJicnh+OPP54nnniiwL9fc801nHvuuayIzPtW1e2Cd5769evz22+/MW3aNMCGibZs2UKdOnWYOXMmW7duZcGCBXz22Wc77csRRxzB559/zuOPP06/fv0AaN26NR9//PG28pDr1q0rcgqJUK/4VXUdUGmHbcuxWT6FU7Wqpdls2xY6dYL337dVWQERsaC/erUF/rJlId+ML+dcErr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sINm6E9u1h4cJAm3fOFUG0gf9AVR2oqu9FHoOAA8PsmCsGp55qRVzeeMNe//VXoM03amQLiJcvtyv/Jb5iw7m4EG3g/0JEtq35F5FWgM/bSAbnnWdFXF54wVZhBZx1LTcX3nwTfvnFxvz//DPQ5p1zhRBt4G8FfCIiP4vIz8CnwOEi8rWIfBVa71zxuPpqK+IyfLgl3Qk4+Ldta/eTZ82y2T5r1ux+H+dceKJN0tY51F642LvtNluF9cADNik/4LSbnTrZj4q+fe1+8ptvQkZGoF/hnItSVIFfVeeH3REXYyJw//12OX7bbRb8r7wy0K/o1csKhZ1yip0ARo+2mT/OueIV7RW/SwUlSliazbVr4aqrLOvauecG+hUnn2w/LM47z04Azz7rJRydK24e+N320tLgmWcs+J93ngX/U04J9CvOPdd+WOSdW4YNs3OOc654eOB3/1SyJLz0kq3sPe00yM6G3jtm5i6aK6+0K//bbrPgf//9NtrknAufX2e5gmVkWI7lVq2gf3+7GxuwW26Biy+GBx+Em24KvHnn3E544Hc7V6YMvPUWNG5sK30nTAi0+bz7yWeeaVf+994baPPOuZ3wwO92rUIFS7l54IE2D/P99wNtXgQeewz69bMx/0cfDbR551wBPPC73cvJsZSbdevauP8nnwTafN795G7d7H7yM88E2rxzbgce+F10qlSx4L/33la8fdq0QJvPu5981FFw+um20tc5Fw4P/C561avDu+9CpUqWeGfmzECbz7uf3LKlDf28806gzTvnIkIL/CKSISKficiXIvKtiNwS2Z4jIhNEZE7kuWJYfXAhqFHDgn/Zsn/QoKoAABW5SURBVJZy85tvAm0+735yw4a20vfDDwNt3jlHuFf8G4GjVLUJ0BToHMnwORiYpKr1gEmR9y6R1Kljwb90aQv+338faPMVK9rVfu3adkthutd6cy5QoQV+NXl5GEtGHgr04O8iLiOBnmH1wYVo//2tiIuqDczPnRto81Wr2uzRSpUswVvAPyycS2mhjvGLSJqIzASWABNUdSpQTVUXAUSeq+5k30EiMl1Epi9dujTMbrrCql/fgv/GjRb85weby69GDbufXLo0dOgAP/4YaPPOp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lXV/KW5Eu5YVPVrVa2qqnUi8WAh0Dzy/1XxH4+qxs0DOAz7ifMVMDPy6ApUwmYozIk858S6r4U4tiOAsZHXCXk8QFNgeuTfz2tAxUQ9lsjx3ALMBr4BngFKJ9LxAM9j9yc2Y4HkzF31HxtqmAt8D3SJdf+jOJYfsbHvvFgwNBGOZWfHs8PffwYqx+p4PGWDc86lmLga6nHOORc+D/zOOZdiPPA751yK8cDvnHMpxgO/c86lGA/8zhWSiFwXye75lYjMFJFWse6Tc9Eo9tKLziUDEfkXtqK0uapujKTYLRXjbjkXFQ/8zhVOdWCZqm4EUNVlMe6Pc1HzBVzOFUIkkeBHWDrnicAoVX0/tr1yLjo+xu9cIajqGqAFMAhLVz1KRE6Laaeci5Jf8TsXABE5Dhigqt1j3Rfndsev+J0rBBE5UETq5dvUFJgfq/44tyf85q5zhVMG+E+kAPgWLJPkoNh2ybno+FCPc86lGB/qcc65FOOB3znnUowHfuecSzEe+J1zLsV44HfOuRTjgd8551KMB37nnEsx/w+K57V1XRcsnQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "NIG_p.plot([20,150,0,80])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### American Put"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {},
   "outputs": [],
   "source": [
    "opt_param3 = Option_param(S0=S0, K=K, T=T, exercise=\"American\", payoff=\"put\" )\n",
    "NIG_am = NIG.NIG_pricer(opt_param3, NIG_param)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(5.06447605936324, 16.304216861724854)"
      ]
     },
     "execution_count": 111,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "NIG_am.PIDE_price((10000,10000), Time=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEWCAYAAABhffzLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3dd3gVZf7+8feHJJACCIGACCigID0hBAKigCJFpdlA14IVdS1r+ymuu7avuhasqy6LqLCui9hQBOmIUgQTNHSQIk2RJr0lIc/vjzlIgBBCyDmT5Nyv65przsyZObnPXPCZOc/MPGPOOUREJHyU8TuAiIiElgq/iEiYUeEXEQkzKvwiImFGhV9EJMyo8IuIhBkVfpEQMrOxZtbP7xwS3lT4pVQys1VmtsHM4nLNu8XMpuaadmZ2Vq7p+mb2oZltMrMdZrbMzP5pZrWKKpdz7iLn3LCi+jyRwlDhl9IsEvhLQRYM7ABmA78CLZxzFYF2wArg3JMNYh79f5NiQf8QpTR7EXjQzCoVYNkngBnOufudc+sAnHMbnXOvOuc+zGsFM7vBzGYEfhVsN7MlZtYp1/tTzewZM5sB7AHqBebdkmuZW81ssZntNLNFZpYcmH+amX0a+PXxs5ndU/jNIHI4FX4pzdKBqcCDBVj2QuDTQvyNVGAlUBV4HPjMzOJzvX8d0B+oAKzOvaKZXYm3w7keqAj0BLYEfhl8CcwFagKdgHvNrGsh8okcRYVfSrvHgLvNLOE4y1UFfjs4YWZ3mdk2M9tlZm/ns95G4FXnXJZzbgSwFLgk1/tDnXMLnXPZzrmsI9a9BXjBOZfmPMudc6uBVkCCc+4p51ymc24l8DZwVcG+skj+VPilVHPOLQBGAwOOs+gWoEau9d5wzlUCXgWi8lnvF3d4T4ergdNyTa/NZ93aeOcQjnQGcFpgx7PNzLYBfwWqH+c7iBSICr+Eg8eBW/GaTY5lMnBZIT67pplZrunT8U4QH5Rf97drgTO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yv7+RRApGTT0iImFGTT0iImFGhV9EJMyo8IuIhBkVfhGRMKPCLyISZlT4RUTCjAq/iEiY+f/OdVXohK6tywAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "NIG_am.plot([50,150,0,60])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## References\n",
    "\n",
    "[1] Rama Cont and Peter Tankov (2003) \"Financial Modelling with Jump Processes\", Chapman and Hall/CRC; 1 edition.  \n",
    "\n",
    "[2] Rydberg Tina (1997) \"The Normal Inverse Gaussian Lévy Process:\n",
    "Simulation and Approximation\",  Communications in Statistics. Stochastic Models. 13:4, 887-910\n",
    "\n",
    "[3] Barndorff-Nielsen, Ole E. (1998) \"Processes of Normal Inverse Gaussian type\" Finance and Stochastics 2, 41-68."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
